import java.util.ArrayList;
import java.util.List;

public class Offer57I {
    public int[][] findContinuousSequence(int target) {
        int left =1;
        int right = 1;
        int current= 0;
        List<int[]> list = new ArrayList<>();
        while (left<=target/2){
            if (current<target){
                current+=right;
                right++;
            }else if (current>target){
                current-=left;
                left++;
            }else {
                int[] ints = new int[right - left];
                for (int i = left; i < right; i++) {
                    ints[i-left] = i;
                }
                list.add(ints);
                current-=left;
                left++;
            }
        }
        return list.toArray(new int[list.size()][]);
    }
}
